package com.gs.gaosheng.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gs.common.annotation.Excel;
import com.gs.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 订单对象 gs_order
 *
 * @author yy
 * @date 2023-08-03
 */
public class GsOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单id */
    private String orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNum;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 商品id */
    @Excel(name = "商品id")
    private Long goodsId;

    /** 商品名 */
    @Excel(name = "商品名")
    private String goodsName;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Long goodsCount;

    /** 订单状态1-待付款 2-已付款 3-超时失效 4-逻辑删除 */
    @Excel(name = "订单状态1-待付款 2-已付款 3-超时失效 4-逻辑删除")
    private Long orderStatus;

    /** 订单总金额（打折前） */
    @Excel(name = "订单总金额", readConverterExp = "打=折前")
    private Double orderTotal;

    /** 订单应付金额（打折后） */
    @Excel(name = "订单应付金额", readConverterExp = "打=折后")
    private Double orderTotalPay;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    /** 是否显示在在用户订单列表里1-显示 0-不显示 */
    @Excel(name = "是否显示在在用户订单列表里1-显示 0-不显示")
    private Long showFlag;

    /** 购物平台，1-淘宝，2-京东，3-拼多多 */
    @Excel(name = "购物平台，1-淘宝，2-京东，3-拼多多")
    private Long orderPlat;

    /** 本单获得积分 */
    @Excel(name = "本单获得积分")
    private Long orderScore;

    /** 是否使用优惠券 */
    @Excel(name = "是否使用优惠券")
    private Long orderCoupon;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Long orderCouponId;

    public GsOrder() {
    }

    public void setOrderId(String orderId)
    {
        this.orderId = orderId;
    }

    public String getOrderId()
    {
        return orderId;
    }
    public void setOrderNum(String orderNum)
    {
        this.orderNum = orderNum;
    }

    public String getOrderNum()
    {
        return orderNum;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    public void setGoodsId(Long goodsId)
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId()
    {
        return goodsId;
    }


    public void setGoodsName(String goodsName)
    {
        this.goodsName = goodsName;
    }


    public String getGoodsName()
    {
        return goodsName;
    }
    public void setGoodsCount(Long goodsCount)
    {
        this.goodsCount = goodsCount;
    }

    public Long getGoodsCount()
    {
        return goodsCount;
    }
    public void setOrderStatus(Long orderStatus)
    {
        this.orderStatus = orderStatus;
    }

    public Long getOrderStatus()
    {
        return orderStatus;
    }
    public void setOrderTotal(Double orderTotal)
    {
        this.orderTotal = orderTotal;
    }

    public Double getOrderTotal()
    {
        return orderTotal;
    }
    public void setOrderTotalPay(Double orderTotalPay)
    {
        this.orderTotalPay = orderTotalPay;
    }

    public Double getOrderTotalPay()
    {
        return orderTotalPay;
    }
    public void setOrderTime(Date orderTime)
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime()
    {
        return orderTime;
    }
    public void setShowFlag(Long showFlag)
    {
        this.showFlag = showFlag;
    }

    public Long getShowFlag()
    {
        return showFlag;
    }
    public void setOrderPlat(Long orderPlat)
    {
        this.orderPlat = orderPlat;
    }

    public Long getOrderPlat()
    {
        return orderPlat;
    }
    public void setOrderScore(Long orderScore)
    {
        this.orderScore = orderScore;
    }

    public Long getOrderScore()
    {
        return orderScore;
    }
    public void setOrderCoupon(Long orderCoupon)
    {
        this.orderCoupon = orderCoupon;
    }

    public Long getOrderCoupon()
    {
        return orderCoupon;
    }
    public void setOrderCouponId(Long orderCouponId)
    {
        this.orderCouponId = orderCouponId;
    }

    public Long getOrderCouponId()
    {
        return orderCouponId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNum", getOrderNum())
            .append("userId", getUserId())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("goodsCount", getGoodsCount())
            .append("orderStatus", getOrderStatus())
            .append("orderTotal", getOrderTotal())
            .append("orderTotalPay", getOrderTotalPay())
            .append("orderTime", getOrderTime())
            .append("showFlag", getShowFlag())
            .append("orderPlat", getOrderPlat())
            .append("orderScore", getOrderScore())
            .append("orderCoupon", getOrderCoupon())
            .append("orderCouponId", getOrderCouponId())
            .toString();
    }
}
